package com.zf.rpc.exception;

import com.zf.rpc.enumeration.RpcError;

/**
 * @ProjectName: RPC-zhaofeng
 * @Package: com.zf.rpc.exception
 * @ClassName: RpcException
 * @Author: zf
 * @Description:
 * @Date: 2021/5/7 14:12
 * @Version: 1.0
 */
public class RpcException extends RuntimeException{
    public RpcException(RpcError error, String detail) {
        super(error.getMessage() + ": " + detail);
    }

    public RpcException(String message, Throwable cause) {
        super(message, cause);
    }

    public RpcException(RpcError error) {
        super(error.getMessage());
    }
}
